package com.yuanfeng.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yuanfeng.business.entity.ShopRetentionMoneyRecordEntity;
import com.yuanfeng.business.vo.ShopDetailEntityExpVO;
import com.yuanfeng.business.vo.ShopDetailVO;
import com.yuanfeng.commoms.vo.goods.GoodsDetailsListVO;
import com.yuanfeng.commoms.vo.order.OrderComplaintsVO;
import com.yuanfeng.commoms.vo.payment.PayRecordVO;
import com.yuanfeng.commoms.vo.shop.RetentionShopInfoVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @ClassName ShopRetentionMoneyRecordMapper
 * @Description  质保金充值，提现记录
 * @Author cyp
 * @Date 2023-08-21 13:42:41
 * @Version 1.0
 **/
@Mapper
public interface ShopRetentionMoneyRecordMapper extends BaseMapper<ShopRetentionMoneyRecordEntity> {

    /**
     * 查询未赔付投诉单
     * @param shopId
     * @return
     */
    List<OrderComplaintsVO> unpaidcomplaints(@Param("shopId")String shopId);

    /**
     * 查询账户余额
     * @param userId
     * @return
     */
    String queryAccountBalance(@Param("userId")String userId);

    void updateCardMemberDetailPort(Map<String, Object> manageMoney);

    Integer updateCardMemberDetailPort2(Map<String, Object> manageMoney);

    void insertDetail(@Param("param") Map<String, Object> map);

    void insertConsumeRecordport(Map<String, Object> comRecord);

    /**
     * 修改投诉单赔付状态
     * @param id
     */
    void updateispay(@Param("id")Integer id);

    /**
     * 查询质保金信息
     * @param shopId
     * @return
     */
    RetentionShopInfoVO selectRetention(String shopId);


    /**
     * 查询质保金信息
     * @param shopId
     * @return
     */
    RetentionShopInfoVO selectretention2(String shopId);
    /**
     * 发送站内信
     * @param messageOrderId
     * @param sellerId
     * @param sellerName
     * @param messageType
     * @param messageTitle
     * @param messageContent
     * @param shopId
     * @return
     */
    public boolean insertSysMessage(@Param("messageOrderId") String messageOrderId,@Param("sellerId") String sellerId, @Param("sellerName") String sellerName,
                                    @Param("messageType") Integer messageType, @Param("messageTitle") String messageTitle,
                                    @Param("messageContent") String messageContent,@Param("shopId") String shopId);

    Integer updateshopbase(@Param("param")Map<String, Object> map);

    Integer insertRetentionMoney(@Param("param") Map<String, Object> map);


    IPage<ShopRetentionMoneyRecordEntity> queryRecord(IPage<ShopRetentionMoneyRecordEntity> page , @Param("param") Map<String, Object> param);


    IPage<ShopDetailVO> queryComplaintsRecord(IPage<ShopDetailVO> page , @Param("param")Map<String, Object> param);


    IPage<ShopDetailVO> queryComplaintsRecord2(IPage<ShopDetailVO> page , @Param("param") Map<String, Object> param);


    IPage<OrderComplaintsVO> qureyComplaint(IPage<OrderComplaintsVO> page , @Param("param") Map<String, Object> param);

    List<GoodsDetailsListVO> queryGoodsList(@Param("param") Map<String, Object> map);

    Integer selectretentiontotal(@Param("shopId") String shopId,@Param("complaintsStatus")Integer complaintsStatus);


    String querymonthFine(@Param("param") Map<String, Object> map);

    String queryAllFine(@Param("shopId") String shopId);

    OrderComplaintsVO queryComplaintsId(@Param("complaintsId") String complaintsId);

    Integer handlingComplaints(@Param("param") Map<String, Object> map);

    OrderComplaintsVO queryComplaintsId1(@Param("complaintsId") Integer complaintsId);

    IPage<ShopDetailEntityExpVO> queryComplaintsRecordExp(IPage<ShopDetailEntityExpVO> page , @Param("param") Map<String, Object> param);


    String selectOrderUserId(String orderId);


    List<Integer> selectGoodsId(String orderId);


    Map<String, Object> selectOrderId(String complaintsId);


    Integer addComplaints(@Param("param") Map<String,Object> map);


    IPage<PayRecordVO> queryRecord2(IPage<PayRecordVO> page , @Param("param") Map<String, Object> param);


    PayRecordVO queryRecordId(@Param("rechargeId") Integer rechargeId);


    Integer updateRecord(@Param("param") Map<String, Object> map);


}
